-
Notifications
You must be signed in to change notification settings - Fork 5.1k
/
subscriptions.json
300 lines (300 loc) · 9.64 KB
/
subscriptions.json
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
{
"swagger": "2.0",
"info": {
"version": "2018-03-01-preview",
"title": "SubscriptionClient",
"description": "Subscription client provides an interface to create and manage Azure subscriptions programmatically."
},
"schemes": [
"https"
],
"host": "management.azure.com",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"paths": {
"/providers/Microsoft.Subscription/subscriptionOperations": {
"get": {
"description": "Lists all of the available pending Microsoft.Subscription API operations.",
"operationId": "SubscriptionOperations_List",
"x-ms-examples": {
"getPendingSubscriptionOperations": {
"$ref": "./examples/getSubscriptionOperations.json"
}
},
"responses": {
"200": {
"description": "OK. The request has succeeded.",
"schema": {
"$ref": "#/definitions/SubscriptionOperationListResult"
}
},
"default": {
"description": "Error response describing why the operation failed.",
"schema": {
"$ref": "#/definitions/ErrorResponse"
}
}
},
"parameters": [
{
"$ref": "#/parameters/apiVersionParameter"
}
]
}
},
"/providers/Microsoft.Subscription/subscriptionOperations/{operationId}": {
"get": {
"description": "Get the status of the pending Microsoft.Subscription API operations.",
"operationId": "SubscriptionOperation_Get",
"x-ms-examples": {
"getPendingSubscriptionOperations": {
"$ref": "./examples/getSubscriptionOperation.json"
}
},
"responses": {
"200": {
"description": "Successful completion of the asynchronous operation",
"schema": {
"$ref": "#/definitions/SubscriptionCreationResult"
}
},
"202": {
"description": "Accepted. Subscription update is in progress.",
"headers": {
"Location": {
"description": "The URL where the status of the asynchronous operation can be checked.",
"type": "string"
},
"Retry-After": {
"description": "The amount of delay to use while the status of the operation is checked. The value is expressed in seconds.",
"type": "integer",
"format": "int64"
}
}
},
"default": {
"description": "Error response describing why the operation failed.",
"schema": {
"$ref": "#/definitions/ErrorResponseBody"
}
}
},
"parameters": [
{
"name": "operationId",
"in": "path",
"description": "The operation ID, which can be found from the Location field in the generate recommendation response header.",
"required": true,
"type": "string"
},
{
"$ref": "#/parameters/apiVersionParameter"
}
]
}
},
"/providers/Microsoft.Billing/enrollmentAccounts/{enrollmentAccountName}/providers/Microsoft.Subscription/createSubscription": {
"post": {
"description": "Creates an Azure subscription",
"operationId": "SubscriptionFactory_CreateSubscriptionInEnrollmentAccount",
"x-ms-examples": {
"createSubscription": {
"$ref": "./examples/createSubscription.json"
}
},
"x-ms-long-running-operation": true,
"responses": {
"200": {
"description": "Normal response for a successful query. The response body will contain the data that matches the filters specified in the query parameters.",
"schema": {
"$ref": "#/definitions/SubscriptionCreationResult"
}
},
"202": {
"description": "Accepted. Subscription creation is in progress.",
"headers": {
"Location": {
"description": "GET this URL to retrieve the status of the asynchronous operation.",
"type": "string"
},
"Retry-After": {
"description": "The amount of delay to use while the status of the operation is checked. The value is expressed in seconds.",
"type": "string"
}
}
},
"default": {
"description": "Error response describing why the operation failed.",
"schema": {
"$ref": "#/definitions/ErrorResponse"
}
}
},
"parameters": [
{
"name": "enrollmentAccountName",
"in": "path",
"description": "The name of the enrollment account to which the subscription will be billed.",
"required": true,
"type": "string"
},
{
"$ref": "#/parameters/apiVersionParameter"
},
{
"name": "body",
"in": "body",
"description": "The subscription creation parameters.",
"required": true,
"schema": {
"$ref": "#/definitions/SubscriptionCreationParameters"
}
}
]
}
}
},
"definitions": {
"SubscriptionCreationResult": {
"description": "The created subscription object.",
"properties": {
"subscriptionLink": {
"description": "The link to the new subscription. Use this link to check the status of subscription creation operation.",
"type": "string"
}
}
},
"SubscriptionCreationParameters": {
"description": "Subscription Creation Parameters required to create a new Azure subscription.",
"properties": {
"displayName": {
"description": "The display name of the subscription.",
"type": "string"
},
"owners": {
"type": "array",
"items": {
"$ref": "#/definitions/AdPrincipal"
},
"description": "The list of principals that should be granted Owner access on the subscription. Principals should be of type User, Service Principal or Security Group."
},
"offerType": {
"description": "The offer type of the subscription. For example, MS-AZR-0017P (EnterpriseAgreement) and MS-AZR-0148P (EnterpriseAgreement devTest) are available. Only valid when creating a subscription in a enrollment account scope.",
"type": "string",
"x-ms-enum": {
"name": "offerType",
"modelAsString": true
},
"enum": [
"MS-AZR-0017P",
"MS-AZR-0148P"
]
},
"additionalParameters": {
"description": "Additional, untyped parameters to support custom subscription creation scenarios.",
"type": "object",
"additionalProperties": {
"type": "object"
}
}
}
},
"ErrorResponse": {
"description": "Describes the format of Error response.",
"type": "object",
"properties": {
"code": {
"description": "Error code",
"type": "string"
},
"message": {
"description": "Error message indicating why the operation failed.",
"type": "string"
}
}
},
"ErrorResponseBody": {
"description": "Error response indicates that the service is not able to process the incoming request. The reason is provided in the error message.",
"type": "object",
"properties": {
"error": {
"description": "The details of the error.",
"$ref": "#/definitions/ErrorResponse"
}
}
},
"AdPrincipal": {
"description": "Active Directory Principal who’ll get owner access on the new subscription.",
"properties": {
"objectId": {
"description": "Object id of the Principal",
"type": "string"
}
},
"required": [
"objectId"
]
},
"SubscriptionOperationListResult": {
"description": "A list of pending subscription operations.",
"properties": {
"value": {
"description": "A list of pending SubscriptionOperations",
"type": "array",
"items": {
"$ref": "#/definitions/SubscriptionOperation"
}
}
}
},
"SubscriptionOperation": {
"description": "status of the subscription POST operation.",
"properties": {
"id": {
"type": "string",
"description": "The operation Id.",
"readOnly": true
},
"status": {
"description": "Status of the pending subscription",
"type": "string"
},
"statusDetail": {
"description": "Status Detail of the pending subscription",
"type": "string"
}
}
}
},
"parameters": {
"apiVersionParameter": {
"name": "api-version",
"in": "query",
"required": true,
"type": "string",
"description": "Version of the API to be used with the client request. Current version is 2015-06-01"
}
},
"security": [
{
"azure_auth": [
"user_impersonation"
]
}
],
"securityDefinitions": {
"azure_auth": {
"type": "oauth2",
"authorizationUrl": "https://login.microsoftonline.com/common/oauth2/authorize",
"flow": "implicit",
"description": "Azure Active Directory OAuth2 Flow",
"scopes": {
"user_impersonation": "impersonate your user account"
}
}
}
}